package com.ccl.iot.bean;

/**
 * @description：防区信息
 * @author： HD
 * @time：2017/5/10
 */

public class ArmZoneInfoBean {

    /**
     *位置起始位
     */
    private int mAddressStart;

    /**
     *防区类型：EALARM_TYPE
     */
    private int mType;

    /**
     *线路状态：1为开路，0为闭合，对用户只读
     */
    private int mLineState;

    /**
     *防区状态：EALARM_STATE，对用户只读
     */
    private int mState;

    private byte mData;

    private boolean isShow;

    private int mIndex;

    private String name;

    private boolean isTriggerPush;
    private boolean isAlarmPush;

    /**
     * 是否已经在服务器设置触发推送
     */
    private boolean isNetTriggerPush;
    /**
     * 是否已经在服务器设置报警推送
     */
    private boolean isNetAlarmPush;

    /**
     * 服务器上的推送ID
     */
    private long netTriggerPushID;

    private long netAlarmPushID;


    public ArmZoneInfoBean(int addressStart, byte data, int index) {
       init(addressStart,data,index);
    }

    public void init(int addressStart, byte data, int index) {
        this.mAddressStart = addressStart;
        mData = data;
        mType = data & 0x0f;
        mLineState = (data >> 4) & 0x01;
        mState = (data >> 5) & 0xff;
        mIndex = index;
    }

    public int getType() {
        return mType;
    }

    public int getLineState() {
        return mLineState;
    }

    public int getState() {
        return mState;
    }

    public int getAddressStart() {
        return mAddressStart;
    }

    public byte getData(){
        return mData;
    }

    public boolean isShow() {
        return isShow;
    }

    public void setShow(boolean show) {
        isShow = show;
    }

    public int getIndex() {
        return mIndex;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    public boolean isTriggerPush() {
        return isTriggerPush;
    }

    public void setTriggerPush(boolean triggerPush) {
        isTriggerPush = triggerPush;
    }

    public boolean isAlarmPush() {
        return isAlarmPush;
    }

    public void setAlarmPush(boolean alarmPush) {
        isAlarmPush = alarmPush;
    }

    public boolean isNetTriggerPush() {
        return isNetTriggerPush;
    }

    public void setNetTriggerPush(boolean netTriggerPush) {
        isNetTriggerPush = netTriggerPush;
    }

    public boolean isNetAlarmPush() {
        return isNetAlarmPush;
    }

    public void setNetAlarmPush(boolean netAlarmPush) {
        isNetAlarmPush = netAlarmPush;
    }


    public long getNetTriggerPushID() {
        return netTriggerPushID;
    }

    public void setNetTriggerPushID(long netTriggerPushID) {
        this.netTriggerPushID = netTriggerPushID;
    }

    public long getNetAlarmPushID() {
        return netAlarmPushID;
    }

    public void setNetAlarmPushID(long netAlarmPushID) {
        this.netAlarmPushID = netAlarmPushID;
    }


}
